import request from "@/utils/request";

export const preparationTask = {
    contextPath: '/equip', //按照实际应用修改成微服务的名�?//
    getdata: (data) => { //分页查询
        return request({
            url: preparationTask.contextPath + '/t-en-stock-task/page',
            method: 'POST',
            data: data
        })
    },
    insertData: (data) => { //新增
        return request({
            url: preparationTask.contextPath + '/t-en-stock-task/insert',
            method: 'POST',
            data: data
        })
    },

    updateData: (data) => { //修改，删除
        return request({
            url: preparationTask.contextPath + '/t-en-stock-task/update',
            method: 'POST',
            data: data
        })
    },
    queryDictDatasb: (code) => { //获取物资
        return request({
            url: preparationTask.contextPath + '/t-en-wz-sblx/getList?pid=' + code,
            method: 'POST',
            // data: code
        })
    },
    getTashNo:()=>{ //获取任务编号
        return request ({
            url: preparationTask.contextPath + '/t-en-stock-task/getTaskNo',
            method: 'POST',
        })
    },

getEquipPage: (data) => { //获取物资
    return request({
        url: preparationTask.contextPath + '/t-en-stock-task/getEquipPage',
        method: 'POST',
        data: data
    })
},
    getTaskEquipList: (taskNo) => { //根据任务编码获取设备列表
        return request({
            url: preparationTask.contextPath + '/t-en-stock-task/getTaskEquipList/' +  taskNo ,
            method: 'POST',

        })
    },

}
